package cz.semjobKB.search.service.api;

import cz.semjobKB.conllx.api.IDocument;
import cz.semjobKB.knowledge.api.IExtractedKnowledge;
import cz.semjobKB.search.api.ISearchRules;
import cz.semjobKB.search.api.RuleCorrectnessException;

/**
 * Interface declares method for search service
 */
public interface ISearchService {

    /**
     * It searches for triples and terminologies in a given document based on the given search configuration
     * @param document      Document to be processed
     * @param searchRules   Search configuration for triples and terminologies
     * @return              Extracted knowledge, list of matched triples and terminologies
     * @throws RuleCorrectnessException Exception thrown if the configuration contains error
     */
	public IExtractedKnowledge extractBase(IDocument document, ISearchRules searchRules) throws RuleCorrectnessException;
}
